{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# py2exe打包工具"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#setup.py脚本, python setup py2exe\n",
    "from distutils.core import setup\n",
    "import py2exe\n",
    "\n",
    "options = {\"py2exe\":\n",
    "                  {\"compressed\": 1,\n",
    "                    \"optimize\": 2,\n",
    "                    \"bundle_files\": 3\n",
    "                   }\n",
    "                }\n",
    "\n",
    "setup(console=['main.py'],  #console控制台、windows win32程序、tt.py入口模块\n",
    "          options = options\n",
    ")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
